<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<ul id="list">
			
		</ul>
		<script type="text/javascript">
			var arr = [{
					"name": "小明",
					"age": 12,
					"sex": "男"
				},
				{
					"name": "小红",
					"age": 11,
					"sex": "女"
				},
				{
					"name": "小强",
					"age": 13,
					"sex": "男"
				}
			]
			
			//获取需要上树的父节点
			var ulList = document.getElementById("list")
			
			
			for (var i= 0;i<arr.length; i++) {
				 ulList.innerHTML += [
					"<li>",
						"<div class='name'>"+arr[i].name+"</div>",
						"<div class='age'>"+arr[i].age+"</div>",
						"<div class='sex'>"+arr[i].sex+"</div>",
					"</li>"
				].join("")
			}

		</script>
	</body>
</html>
